﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using System.ApplicationModel.Composition;
using System.ComponentModel.Composition.Hosting;

namespace Anagramme.Views
{
    /// <summary>
    /// Logique d'interaction pour JoinGameView.xaml
    /// </summary>
    [ViewExport(Modules.JoinGame)]
    [PartCreationPolicy(System.ComponentModel.Composition.CreationPolicy.NonShared)]
    public partial class JoinGameView : UserControl
    {
        /// <summary>
        /// Crée une nouvelle instance de la classe <see cref="JoinGameView"/>
        /// </summary>
        public JoinGameView()
        {
            InitializeComponent();
            this.Loaded += delegate { txtIP.Focus(); };
        }

        /// <summary>
        /// Obtient le ViewModel associé
        /// </summary>
        [ViewModelImport(Modules.JoinGame)]
        public object ViewModel
        {
            get { return this.DataContext; }
            set { this.DataContext = value; }
        }
    }
}
